import axios from 'axios'
// import Cookies from 'js-cookie'
const instance = axios.create({
  baseURL: 'http://localhost:8888',
  timeout: 15000
})

// instance.interceptors.request.use(config => {
//   const token = Cookies.get('token')
//   if (token) {
//     config.headers = config.headers || {}
//     config.headers.Authorization = token
//   }
//   return config
// }, err => {
//   return Promise.reject(err)
// })

instance.interceptors.response.use(result => {
  // return result.data
  return result
}, err => {
  return Promise.reject(err)
})
export default instance
